﻿/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __273520E4_AD25_43bd_95F0_195FAE963CF1__
#define __273520E4_AD25_43bd_95F0_195FAE963CF1__

#include "../tools/head.h"

/////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos_aio
{
    class aio_impl;
    class aio_data;
    class aio_key;

    class aio_tcp
    {
    public:
        aio_tcp( aio_impl * pAioImpl );
        ~aio_tcp();

    protected:
        aio_impl * m_pAioImpl;

    public:
        int tcp_init( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );

        int tcp_accept_ret( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );
        int tcp_accept( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );

        int tcp_connect_ret( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );
        int tcp_connect( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );

        int tcp_recv_ret( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );
        int tcp_recv( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );

        int tcp_send_ret( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );
        int tcp_send( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );

        int shut_down_ret( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );
        int shut_down( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );

        int close_net_ret( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );
        int close_net( int nResult, DWORD dwBytes, aio_key * lpKey, aio_data * lpData );

    };
} // xos_aio

#endif // __273520E4_AD25_43bd_95F0_195FAE963CF1__
